#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#

addr="10.40.1.12"
with open("port.txt", "a", encoding="utf-8") as write_f:
    for i in range(40601,40901):
        command="netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport={0} connectaddress={1} connectport={0}".format(i,addr)
        write_f.write("{}\n".format(command))
